package net.takela.common.spring.http;
/**
 * @author baboy
 * create at 2023/1/22
 */
public enum StatusCode {
	SUCCESS(0, "success"),
	ERROR(500, "svc.error"),
	PARAM_ERROR(400, "param.error"),
	AUTH_ERROR(401, "auth.error"),
	REQUEST_TIME_ERROR(402, "timestamp.error"),
	REQUEST_MISS_HEADER(402, "header.missed"),
	REQUEST_INVALID(402, "request.invalid"),
	ACL_ERROR(403, "acl.error"),
	DB_ERROR(550, "db.handle.error");
	private int code;
	private String message;
	StatusCode(int code, String message){
		this.code = code;
		this.message = message;
	}
    /**
     * 
     */
	public int getCode() {
		return code;
	}
    /**
     * 
     */
	public void setCode(int code) {
		this.code = code;
	}
    /**
     * 
     */
	public String getMessage() {
		return message;
	}
    /**
     * 
     */
	public void setMessage(String message) {
		this.message = message;
	}

	public static String STATUS_CODE_KEY = "query";
	public static String STATUS_MSG_KEY = "msg";
	public static String STATUS_DATA_KEY = "data";
}
